﻿using System;
using System.Data;
using System.Collections.Generic;
using Maticsoft.Common;
using Hyfw.Model;
using System.Collections;
namespace Hyfw.BLL
{
	/// <summary>
	/// CommodityManager
	/// </summary>
	public partial class CommodityManager
	{
		private readonly Hyfw.DAL.CommodityService dal=new Hyfw.DAL.CommodityService();
		public CommodityManager()
		{}

        /// <summary>
        /// 获取商品列表
        /// </summary>
        /// <param name="key">搜索关键字</param>
        /// <param name="pageIndex">第几页</param>
        /// <param name="pageSize">页显示数量</param>
        /// <param name="sortFiled">排序字段</param>
        /// <param name="sortOrder">排序规则，降序，还是升序</param>
        /// <returns></returns>
        public Hashtable SerachCommodity(string key,int pageIndex,int pageSize,string sortFiled,string sortOrder,string roleName,string factoryNo)
        {
            return dal.SerachCommodity(key, pageIndex, pageSize, sortFiled, sortOrder, roleName, factoryNo);
        }

        public void Add(Hashtable ht)
        {
            dal.Add(ht);
        }

        public void Delete(int id)
        {
            dal.Delete(id);
        }

        public void Update(Hashtable ht)
        {
            dal.Update(ht);
        }

        public Hashtable GetCommodity(int id)
        {
            return dal.GetCommodity(id);
        }

        public bool CommodityNoIsExist(string commodityNo)
        {
            return dal.CommodityNoIsExist(commodityNo);
        }
       
	}
}

